<template>
	<view>
		<view class="detailedBox" v-for="(ele,ind) in cashList" v-if="isShow==true" :key="ind">
			<view class="detailedBoxItem">
				<view>
					<view>充值金额</view>
					<view>￥{{ele.OPT_AMOUNT}}</view>
				</view>
				<view>
					<view>充值方式</view>
					<view>{{ele.RECHARGE_WAY==19?'网银转账':"柜台交款"}}</view>
				</view>
				<view>
					<view>操作日期</view>
					<view>{{ele.OPT_TIME}}</view>
				</view>
				<view>
					<view>存款人姓名</view>
					<view>{{ele.RECHARGE_NAME || "无"}}</view>
				</view>
				<view>
					<view>充值单号</view>
					<view>{{ele.SERIAL_CODE}}</view>
				</view>
				<view>
					<view>状态</view>
					<view>{{ele.AUDIT_STATUS==1?'已审核':'未审核'}}</view>
				</view>
				<view>
					<view>存款单号</view>
					<view>{{ele.RECHARGE_ACCOUNT || "无"}}</view>
				</view>
				<view>
					<view>付款日期</view>
					<view>{{ele.PAYMENT_TIME}}</view>
				</view>
				<view>
					<view>备注</view>
					<view>{{ele.MEMO}}</view>
				</view>
			</view>		
		</view>
		<button class='keepBnt bg-color' @click="addRecharge">添加</button>
	</view>
</template>

<script>
	import {
		getCashValueData
	} from '@/api/directSelling.js'
	export default {
		data() {
			return {
				isShow:false,
				cashList:[]
			}
		},
		created() {
			uni.showLoading({
				title: '查询中',
				mask: true
			});
			this.getCashValueData();
		},
		methods: {
			getCashValueData(){
				getCashValueData({
					pageSize: 20,
					pageNumber: 1
				}).then((res)=>{
					let data=res.data.rows;
					this.cashList=data;
					this.isShow=true;
					uni.hideLoading();
				}).catch((err)=>{
					
				})
			},
			addRecharge(){
				uni.navigateTo({
					url: "/pages/electronicWallet/cashRecharge/addRecharge"
				});
			}
		}
	}
</script>

<style lang="scss">
	body,
	page {
		width:100%;
		background:#fff;
		padding: 20rpx 30rpx;
		box-sizing: border-box;
	}

	.detailedBox {
		width: 100%;
		height: auto;
		padding: 20rpx 30rpx;
		box-sizing: border-box;
		box-shadow: 0px 0px 10px #e6e6e6;
		border-radius: 21rpx;
		margin-bottom:30rpx;
		.detailedTotal {
			text-align: center;

			.amount {
				font-size: 56rpx;
				font-weight: bold;
				margin-top: 25rpx;
				margin-bottom: 20rpx;
			}
		}

		>view.detailedBoxItem>view {
			display: flex;
			justify-content: space-between;
			line-height: 45rpx;
			font-size: 30rpx;
			margin-top: 25rpx;
		}
	}
	.keepBnt {
		width: 690rpx;
		height: 86rpx;
		border-radius: 50rpx;
		text-align: center;
		line-height: 86rpx;
		margin: 50rpx auto;
		font-size: 32rpx;
		color: #fff;
	}
</style>
